= journals_tag
- main_toolbar do |t|
  = t.new label: :duplicate.tl, params: { duplicate_of: resource.id, redirect: nil }
  = t.export :journal_entry_sheet
  = t.edit resource if resource.updateable?
  = t.destroy

= main_informations attachment: true do
  = attributes_list do |l|
    - l.attribute :number
    - l.attribute :printed_on
    - l.attribute :created_at
    - l.attribute :state_label
    - if resource.resource
      - l.attribute :resource, url: true
    - l.attribute :journal, url: true
    - l.attribute :real_debit,  currency: :real_currency
    - l.attribute :real_credit, currency: :real_currency
    - if resource.real_currency != resource.currency
      - l.attribute :real_currency_rate
      - l.attribute :debit,  currency: true
      - l.attribute :credit, currency: true
      - l.attribute :balance, currency: true
    - if resource.absolute_currency != resource.real_currency
      - l.attribute :absolute_debit,  currency: :absolute_currency
      - l.attribute :absolute_credit, currency: :absolute_currency

= cobbles do |c|

  - c.cobble :items, title: JournalEntry.human_attribute_name(:items) do
    = cobble_list(:items)

